package com.boom.springapp.javafxdemo.service;

/**
 * @author hhl
 * @version 1.0
 * @description
 * @date 2025/11/17 22:38
 */

import org.springframework.stereotype.Service;

/**
 * 示例服务类
 * 由Spring管理，演示依赖注入
 */
@Service
public class MainService {

    public String getGreeting(String name) {
        if (name == null || name.trim().isEmpty()) {
            return "Hello, World!";
        }
        return "Hello, " + name + "!";
    }

    public String getFarewell(String name) {
        if (name == null || name.trim().isEmpty()) {
            return "Goodbye!";
        }
        return "Goodbye, " + name + "!";
    }
}